<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="<%=basePath%>vendors/jquery/jquery.min.js"></script>
<title>Test Shiro </title>
<script type="text/javascript">
	function add(btn) {
		
		var url = "<%=basePath%>user/"+$(btn).val();

		$.ajax({
			type : 'POST',
			cache : false,
			url : url,
			async : false,
			success : function(result) {
				$("#message").html(result.message);
			},
			error : function(result) {
				alert(result);
			}
		});
	}
</script>
</head>
<body>
<input type="button" value="testRequiresRolesNotExist" onclick="add(this);">
<input type="button" value="testRequiresRolesExist" onclick="add(this);">
<input type="button" value="testRequiresPermissionsNotExist" onclick="add(this);">
<input type="button" value="testRequiresPermissionsExist" onclick="add(this);">
<p id="message"></p>
</body>
</html>